package com.ender.springboot.action;

import com.ender.springboot.dao.StudentMapper;
import com.ender.springboot.model.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class MyAction {

    @Autowired
    private StudentMapper studentMapper;

    @RequestMapping("/hello")
    public Object hello() {
        return studentMapper.selectByPrimaryKey(1);
    }

    @RequestMapping("/getStudentList")
    public List<Student> getStudentList(Integer pageNum, Integer pageSize){
        return studentMapper.getStudentList(pageNum,pageSize);
    }

}
